home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Arsenal Files 8
/
The Arsenal Files Collection #8 (Arsenal Computer) (1996).ISO
/
prg_casm
/
wsc4c10.zip
/
MENU.C
< prev
next >
Wrap
Text File
|
1996-09-08
|
1KB
|
52 lines
/*** menu.c ***/
#include "windows.h"
#include "wsc.h"
#include "menu.h"
extern HWND hMainWnd;
extern int FatalFlag;
extern int OnLineFlag;
extern char Temp[256];
/*** PUBLIC ***/
void CheckTheMenu(int MenuID)
{HMENU hMenu;
if(MenuID)
hMenu = GetMenu(hMainWnd);
CheckMenuItem(hMenu,MenuID,MF_BYCOMMAND | MF_CHECKED);
}
void UncheckTheMenu(int MenuID)
{HMENU hMenu;
hMenu = GetMenu(hMainWnd);
CheckMenuItem(hMenu,MenuID,MF_BYCOMMAND | MF_UNCHECKED);
}
void EnableTheMenu(int MenuID)
{HMENU hMenu;
hMenu = GetMenu(hMainWnd);
EnableMenuItem(hMenu,MenuID,MF_BYCOMMAND | MF_ENABLED);
}
void DisableTheMenu(int MenuID)
{HMENU hMenu;
hMenu = GetMenu(hMainWnd);
EnableMenuItem(hMenu,MenuID,MF_BYCOMMAND | MF_DISABLED | MF_GRAYED);
}
void EnableMenuBarItem(int nPos)
{HMENU hMenu;
hMenu = GetMenu(hMainWnd);
EnableMenuItem(hMenu,nPos,MF_BYPOSITION | MF_ENABLED);
}
void DisableMenuBarItem(int nPos)
{HMENU hMenu;
hMenu = GetMenu(hMainWnd);
EnableMenuItem(hMenu,nPos,MF_BYPOSITION | MF_DISABLED | MF_GRAYED);
}